package top.atluofu.luofuecommerce.product.config;

import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @ClassName: MyRedissonConfig
 * @description: TODO
 * @author: 有罗敷的马同学
 * @datetime: 2022Year-11Month-17Day-21:03
 * @Version: 1.0
 */
@Configuration
public class MyRedissonConfig {

    @Bean(destroyMethod = "shutdown")
    public RedissonClient redissonClient() {
        Config config = new Config();
        config.useSingleServer().setAddress("redis://120.24.55.18:6379");
        return Redisson.create(config);
    }

}
